#include <bits/stdc++.h>
using namespace std;
using uint=unsigned int;
using ll=long long;
using ull=unsigned long long;
using i128=__int128;
const int N=1e6+5;

void solve(){
    
    return;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n;
    cin>>n;
    string s;
    cin>>s;
    if(s.length()%2==0){
        cout<<"No"<<endl;
        return 0;
    }
    int mid=(n+1)/2-1;
    if(s[mid]!='/'){
        cout<<"No"<<endl;
        return 0;
    }
    for(int i=0;i<mid;i++){
        if(s[i]!='1'){
            cout<<"No"<<endl;
            return 0;
        }
    }
    for(int i=mid+1;i<n;i++){
        if(s[i]!='2'){
            cout<<"No"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;

    return 0;
}